package entity

import (
	"gitee.com/linxing_3/sr-core/domain/model"
)

type ConfigModule string

const (
	ConfigModuleUI  ConfigModule = "ui"
	ConfigModuleAPI ConfigModule = "api"
	ConfigModuleEnv ConfigModule = "env"
)

type SysConfig struct {
	model.GIDPk

	Key    string `json:"key"  gorm:"primaryKey;size:128;comment:数据键名"`           // 数据键名
	Desc   string `json:"desc"  gorm:"size:255;comment:数据描述"`                     // 数据描述
	Value  string `json:"value"  gorm:"size:255;comment:数据值"`                     // 数据值
	Module string `json:"module"  gorm:"size:255;comment:模块" search:"type:exact"` // 模块" search:"type:exact

	model.GAllInject
}

func (m *SysConfig) TableName() string {
	return "sys_config"
}
